// The semantic analyzer

package compile

type SemanticAnalyzer struct {
	source     []byte
	sourceName string
	sourceSize int

	classFile *ClassFile

	errHandler SemanticErrorHandler
}

func (self *SemanticAnalyzer) _error(errType string, errMsg string, pos Pos, exit bool) {
	line := pos.Line()
	col := pos.Col()

	self.errHandler(line, col, self.sourceName, errType, errMsg, exit)
}

func (self *SemanticAnalyzer) typeError(n Node, errMsg string) {
	pos := n.Pos()

	self._error("TypeError", errMsg, pos, false)
}

func (self *SemanticAnalyzer) init() {

}
